﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace QYmall.Core.Model.ViewModels
{
    /// <summary>
    /// 订单促销活动(显示)
    /// </summary>
    public class OrderPromotionDto : OrderPromotionEditDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public long Id { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        [Display(Name = "订单号")]
        [StringLength(128)]
        public string? OrderNo { get; set; }

        /// <summary>
        /// 促销活动标题
        /// </summary>
        [Display(Name = "促销活动标题")]
        [StringLength(128)]
        public string? PromotionTitle { get; set; }

        /// <summary>
        /// 促销活动信息
        /// </summary>
        public ShopPromotionDto? Promotion { get; set; }
    }

    /// <summary>
    /// 订单促销活动(编辑)
    /// </summary>
    public class OrderPromotionEditDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        [Display(Name = "所属订单")]
        public long OrderId { get; set; }

        /// <summary>
        /// 促销活动ID
        /// </summary>
        [Display(Name = "促销活动")]
        public long PromotionId { get; set; }
    }
}
